package com.songlanyun.modules.servicegoods.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.songlanyun.common.drive.IBaseService;
import com.songlanyun.common.utils.PageUtils;
import com.songlanyun.modules.group.model.vo.GoodsGroupSlim;
import com.songlanyun.modules.servicegoods.entity.ServiceGoodsGroup;
import com.songlanyun.modules.servicegoods.model.dto.ServiceGoodsGroupDTO;

import java.util.List;
import java.util.Map;

/**
 * 商家的服务分组，只用来在商家店铺内展示
 *
 * @author wuchao
 * @email sunlightcs@gmail.com
 * @date 2020-12-15 11:51:34
 */
public interface ServiceGoodsGroupService extends IBaseService<Long,ServiceGoodsGroup> {

    PageUtils queryPage(Map<String, Object> params);

    ServiceGoodsGroup getById(Long id, boolean isThrow);

    ServiceGoodsGroup getByShopIdAndId(Long shopId,Long id);

    List<GoodsGroupSlim> selectGoodsGroupRelation(Long id);

    ServiceGoodsGroup add(Long shopId, ServiceGoodsGroupDTO dto);

    ServiceGoodsGroup update(Long shopId, ServiceGoodsGroupDTO dto);

    List<ServiceGoodsGroup> getChildren( Long id);

    List<Map<String, Object>> getAllGoodsGroup(Long shopId);

    void deleteByShopIdAndId(Long shopId, Long id);

    List<ServiceGoodsGroup> getFirstProductGoods(Long shopId);
}

